home *** CD-ROM | disk | FTP | other *** search
/ Ham Radio 2000 / Ham Radio 2000.iso / ham2000 / fax_sstv / ezsstv / run.txt < prev    next >
Text File  |  1996-04-26  |  10KB  |  288 lines

  1.                 Run Menu
  2.                 --------
  3.                         
  4. The "Run" menu allows you to define your own menu items to
  5. run external programs.  This can be used for frame grabbers,
  6. printers, paint programs, image processing, or any other 
  7. MS-DOS application.
  8.  
  9. You define these menu items, and associated actions, by
  10. placing commands in the PKTV.CFG file.  The general format is:
  11.  
  12.         RUN_MENU "menu item" keyboard action action ...
  13.  
  14. Details:
  15.  
  16.     RUN_MENU
  17.  
  18.         The line begins with this in either upper or lower case.
  19.         The entire command must appear on a single line, which
  20.         could get quite long.
  21.  
  22.     "menu item"
  23.  
  24.         This is what you want to appear in the menu.
  25.         For example: "HiRes 32..."
  26.         You can omit the quotation marks (") if the item does 
  27.         not contain any blanks.
  28.  
  29.     keyboard
  30.  
  31.         A single character for the keyboard equivalent.  
  32.         When no menu is visible, the menus are searched from 
  33.         left to right so the Run menu is first.
  34.         If you defined a Run menu item with the letter "P", 
  35.         pressing the P key would select this item instead of 
  36.         Print in the File menu.
  37.         In this case, you would have to display the File menu 
  38.         first (with Alt-F) then press P to select the Print 
  39.         function from the keyboard.
  40.  
  41.     action
  42.  
  43.         Finally, you specify one or more "actions" to perform.
  44.         These include:
  45.  
  46.             SELECT="prompt"     - Display the file selector.
  47.             SAVE="file-name"    - Write the current image to 
  48.                                   a file.
  49.             RUN="command"       - Run a program or batch file.
  50.             OPEN="file-name"    - Read an image file.
  51.             DELETE="file-name"  - Delete a file.
  52.  
  53.         Again, the quotation characters (") may be omitted if 
  54.         the item does not contain any spaces.  It is very 
  55.         important to remember that there MUST NOT be any 
  56.         spaces before after the equal sign (=).  This is valid:
  57.  
  58.                 OPEN=XYZ.BMP
  59.  
  60.         But this is not valid:
  61.  
  62.                 OPEN = XYZ.BMP
  63.  
  64.  
  65. More details are contained in the examples below.  When 
  66. adding your own it is easiest to start with an example 
  67. closest to your needs and make minor adjustments.
  68.  
  69.  
  70. Example: MS-DOS Prompt
  71. ----------------------
  72.  
  73.         RUN_MENU "DOS prompt..." ! RUN=
  74.  
  75. This is a special case of the RUN action item which gives you 
  76. the MS-DOS command interpreter.
  77.  
  78. When you pick the "DOS prompt..." menu item, or press the "!" 
  79. key, you will get the MS-DOS command prompt.  When you type 
  80. "EXIT", control will return to Pasokon TV.
  81.  
  82.  
  83. Example: Frame grabbers
  84. -----------------------
  85.  
  86. For Ventek VIP 640C:
  87.  
  88.         RUN_MENU "VIP 640C..." V RUN="PKVIP DIG~TMP.TGA" 
  89.                         OPEN=DIG~TMP.TGA DELETE=DIG~TMP.TGA
  90.  
  91. The PKVIP program grabs an image from the VIP 640C video 
  92. digitizer and stores it into the specified file.   There is 
  93. nothing special about the file name.  I just happened to put 
  94. the ~ character in the middle to minimize the chance of 
  95. overwriting some existing file.  
  96.  
  97. The OPEN action causes the specified file to be read. 
  98.  
  99. The DELETE action causes the specified file to be deleted.
  100.  
  101. PKVIP.EXE is described in the file PKVIP.TXT.
  102.  
  103. PKVIP was written by Ventek in response to all the people who 
  104. wanted to use their product with Pasokon TV.  Please contact 
  105. them if you need further assistance with this program.
  106.  
  107.  
  108. For Digital Vision Computer Eyes RT:
  109.  
  110.         RUN_MENU "Eyes RT..." E RUN="HAMCAP TG=DIG~TMP" 
  111.                         OPEN=DIG~TMP.TGA DELETE=DIG~TMP.TGA
  112.  
  113. Note that there is no file type specified in the TG= command
  114. line argument.
  115.  
  116. Here is a slight variation:
  117.  
  118.         RUN_MENU "CE RT S-Video..." E RUN="HAMCAP SV=1 TG=DIG~TMP" 
  119.                         OPEN=DIG~TMP.TGA DELETE=DIG~TMP.TGA
  120.  
  121. The only difference is the "SV=1" command line option which 
  122. means use the S-video input rather than the NTSC composite input.
  123.  
  124. HAMCAP.EXE is based on the CECAP program and is described in
  125. the files CECAP.TXT and HAMCAP.TXT.
  126.  
  127. HAMCAP was written by Digital Vision in response to all the 
  128. people who wanted to use their product with Pasokon TV.  Please 
  129. contact them if you need further assistance with this program.  
  130. I borrowed one of these during development but don't have it 
  131. any more.
  132.  
  133. Note: The File menu has a predefined item for running a video
  134. digitizer program.  You can't change the menu item and keyboard
  135. equivalent but the action items are the same as the Run menu.
  136.  
  137.  
  138. Example: A non-supported printer
  139. --------------------------------
  140.  
  141.         RUN_MENU "Acme Print" P SAVE=SSTV~TMP.BMP
  142.                 RUN="ACMEPRIN SSTV~TMP.BMP" DELETE=SSTV~TMP.BMP
  143.  
  144. Pasokon TV has built-in support for most popular types of
  145. printers used with personal computers.  Other printer types
  146. can be used with suitable external programs.
  147.  
  148. In this case, pressing the "P" key would save the current 
  149. image in a temporary file called SSTV~TMP.BMP, run the 
  150. hypothetical ACMEPRIN program to print the file, and finally
  151. delete the file.
  152.  
  153.  
  154. Example: Paint programs
  155. -----------------------
  156.  
  157.         RUN_MENU "HiRes 32..." H SAVE=SSTV~TMP.TGA256 RUN=HIRES32 
  158.                         OPEN=SSTV~TMP.TGA256 DELETE=SSTV~TMP.TGA
  159.  
  160. Note: This must appear on a single long line.  It was broken into
  161. 2 lines, above, to fit better in this document.
  162.  
  163. The SAVE action, causes the current image to be stored into a
  164. file called SSTV~TMP.TGA.  The special file extension of ".TGA256"
  165. means store it as a 256 x 240 image with only 32K colors for
  166. compatibility with older versions of HiRes 32.
  167.  
  168. Next, the RUN item means run a program called HIRES32.  If you
  169. don't specify a complete location with directory, the program 
  170. must be in the current directory or it must be somewhere in
  171. the directory search path.
  172.  
  173. The HiRes 32 program does not use a command line argument for
  174. a file name.  Instead it looks for the specific name SSTV~TMP.TGA.
  175. It reads this file automatically.  When you exit from the program
  176. it saves the results in this file.
  177.  
  178. When Pasokon TV regains control, the OPEN action item tells it
  179. to read the modified SSTV~TMP.TGA file.  The extra "256" on the
  180. end of the file name extension is for compatibility with version
  181. 2 and has no effect.
  182.  
  183. Finally, the DELETE item gets rid of the temporary file.
  184.  
  185. Note: The actual sample implementation in the PKTV.CFG file is
  186. a little different.
  187.  
  188.  
  189. Example: Image creation program
  190. -------------------------------
  191.  
  192.         RUN_MENU Flag Z RUN="FLAG FRANCE FRANCE.TGA" 
  193.                         OPEN=FRANCE.TGA DELETE=FRANCE.TGA
  194.  
  195. This simple program generates flags for a several countries.
  196.  
  197. The type of flag can be changed by specifying a different
  198. country on the command line.  Source code, FLAG.C, is provided
  199. so those interested can see how it works and use it as a
  200. starting point for their own applications.
  201.  
  202.  
  203. Example: Read a GIF file
  204. ------------------------
  205.  
  206.         RUN_MENU "Open GIF..." SELECT="Pick GIF file for read:"
  207.                 RUN="GIF2TGA %1 TEMP1$$.TGA"  OPEN=TEMP1$$.TGA  
  208.                 DELETE=TEMP1$$.TGA
  209.  
  210. This version of Pasokon TV does not read GIF files.  The 
  211. reason is that Unisys holds a patent for the compression 
  212. technique used in GIF files.  Anyone using GIF files in a 
  213. commercial or shareware product must obtain a license and pay 
  214. royalties on every copy sold.  That's why GIF support is
  215. disappearing from more and more programs.
  216.  
  217. This restriction does not apply to completely FREE (not
  218. shareware) software.
  219.  
  220. You really wouldn't want to save your beautiful SSTV pictures
  221. in GIF because it can handle a maximum of only 256 colors.
  222. However, there might be cases where you'd want to read an 
  223. existing GIF file.  Here is a work-around.
  224.  
  225. Define a menu item as shown above.  The SELECT action item
  226. means display the file selector with the prompt shown.
  227. In the RUN action item, the "%1" means the result of the 
  228. first SELECT item.  An external program is used to convert
  229. the specified GIF file to a TGA file.  This temp file is
  230. read and deleted.
  231.  
  232. The GIF2TGA program is a free program.  It is being passed 
  233. along as a free service because there is some space left 
  234. over on the diskette.  It is not part of the purchase price.
  235.  
  236. Obviously, the same technique could be used with any other
  237. image conversion program that is controlled by command line
  238. arguments.
  239.  
  240.  
  241. Example: Remote control of transceiver
  242. --------------------------------------
  243.  
  244. Many modern ham transceivers have the ability to accept commands
  245. from a serial port.  You might want to define menu items to
  246. move to your favorite frequencies.  Suppose you had a program
  247. called SETFREQ which would set the frequency of your transceiver.
  248. You might define menu items resembling:
  249.  
  250.         RUN_MENU "14.230" 1 RUN="SETFREQ 14230 USB"
  251.         RUN_MENU "14.233" 2 RUN="SETFREQ 14233 USB"
  252.         RUN_MENU "3.857" 3 RUN="SETFREQ 3857 LSB"
  253.         RUN_MENU "3.862" 4 RUN="SETFREQ 3862 LSB"
  254.  
  255. Just press 1, 2, 3, or 4 to jump between your favorite spots.
  256.  
  257. This example uses an imaginary program called SETFREQ.  If 
  258. someone sends me examples of real programs I'll use them instead.
  259.  
  260.  
  261. Example: An MS Windows program
  262. ------------------------------
  263.  
  264. It is possible to start a Microsoft Windows (3.1) application 
  265. from the MS-DOS command line like this:
  266.  
  267.         win c:\windows\pbrush c:\src\pktv30\sstv~tmp.bmp
  268.  
  269. This means:
  270.     1. Start Microsoft Windows.
  271.     2. Automatically run the Paintbrush program.
  272.     3. Pass a file name to the application, causing it to
  273.         automatically read that file when it starts up.
  274.  
  275. You might be tempted to try something like this:
  276.  
  277.         RUN_MENU "Paintbrush..." P SAVE=SSTV~TMP.BMP 
  278.                 RUN="win c:\windows\pbrush c:\src\pktv30\sstv~tmp.bmp" 
  279.                 OPEN=SSTV~TMP.BMP DELETE=SSTV~TMP.BMP
  280.  
  281. I tried it and it gave me some error message about VDA.386 
  282. whatever that is.
  283.  
  284. I suspect it is impossible, or at least difficult, to make this
  285. work because Pasokon TV has already grabbed most of the memory
  286. for itself.  There is not enough left over to start Windows.
  287.  
  288.